package cn.iocoder.yudao.module.contract.enums;

import lombok.Data;

public enum OrderStatusEnum {
    INSIDE("0", "aa"),
    BAIDU_POLY_PANEL("0", "bb"),
    QUICK_HAIR_CLOUD("0", "cc");


    private OrderStatusEnum(String code,String name){
        this.code = code;
        this.name = name;
    }
    private String code;
    private String name;

    /**
     * 根据code获取name
     * @param code
     * @return
     */
    public static String getNameByCode(String code){
        for(OrderStatusEnum orderStatus:OrderStatusEnum.values()){
            if(code.equals(orderStatus.getCode())){
                return orderStatus.getName();
            }
        }
        return  null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
